/**
 * Created by MDURAND on 26/11/2014.
 *
 * Objet domain UserModel
 */
helloseriesApp.factory('UserModel', function (){
    var UserModel = function (data){

        angular.extend(this, {
            username : null,
            role : null,

            // Fonctions
            getUsernameFormate : function (){
                if (this.username == null){
                    return null;
                }
                return this.username.charAt(0).toUpperCase()+ this.username.substring(1 , this.username.length);
            }


        }, data);

    };


    return UserModel;

});